{% extends "layout" %}

{% block local %}<div id="local">
	{% if tests %}
	{% if tests.getstatus %}<div class="tests_ok">
	<h3 class="has_tests">Tests unitaires</h3>
	<p class="tests_pass">{{ tests.getpasscount }} tests réussis. <!--<a href="kit/{{ id }}/tests">voir le détail</a>.--></p>
	</div>
	{% else %}<div class="tests_ko">
	<h3 class="has_tests">Tests unitaires</h3>
	<p class="tests_fails">{{ tests.getfailcount }} tests en echecs.</p>
	<p class="details"><a href="kit/{{ kit.id }}/tests">voir le détail</a>.</p>
	</div>{% endif %}{% endif %}
</div>{% endblock %}

{% block main %}
	<h2>Kit {{ id }} {{ cfg.kit.version }} </h2>
	<p>{{ cfg.kit.desc }}</p>

	{% if cfg.kit.link %}<p><a href="{{ cfg.kit.link }}">site web</a></p>{% endif %}

	{% if error %}
	<p>{{ error.getMessage }}</p>
	{% endif %}

	{% if cfg.kit.phpversion %}
		<p>Versions de PHP supportees : {{ cfg.kit.phpversion }}</p>
	{% endif %}

	{% if cfg.load_kits %}<div class="dependencies">
	<h3>Kits requis</h3>
	<ul class="req-kits">{% for req in cfg.load_kits %}
		<li><a href="kit/{{ req }}">{{ req}}</a></li>{% endfor %}
	</ul>
	</div>{% endif %}

	{% if kit.listsubkits %}<div class="subkits">
	<h3>Kits inclus</h3>
	<ul>{% for subkit in subkits %}
		<li class="{% ifincollection subkit cfg.load_subkits %}loaded{% endifincollection %}">
			<a href="kit/{{ kit.getid }}.{{ subkit }}">{{ subkit }}</a>

		</li>{% endfor %}
	</ul>
	</div>{% endif %}

	{% if cfg.load_files %}<div class="files">
	<h3>Fichiers</h3>
	<dl>{% for file in cfg.load_files %}
		<dt>{{ file }}</dt>{% endfor %}
	</dl>
	</div>{% endif %}
{% endblock %}
